package com.kupdater;

import com.kupdater.util.JARAdapter;
import com.kupdater.util.RSVersion;
import com.kupdater.util.TransformUtils;
import com.kupdater.transform.Transformer;
import com.sun.org.apache.bcel.internal.generic.ClassGen;

/**
 * Created by IntelliJ IDEA.
 * User: Jan Ove
 * Date: 29.jan.2009
 * Time: 18:15:07
 * To change this template use File | Settings | File Templates.
 */
public class Start {
    public static void main(String[] args){
        System.out.println("KUpdater version 1\n");

        JARAdapter jar = new JARAdapter();
		ClassGen[] classes = jar.loadClasses("kupdater/client/raw/runescape.jar");

		System.out.println("Loaded " + classes.length + " classes from raw/runescape.jar.\n");
        TransformUtils.setClasses(classes);
        RSVersion.getRSVersion(classes);
        
		Transformer.run(classes);

		jar.dumpClasses("kupdater/client/hooked/runescape.jar", classes);
		System.out.println("Packed " + classes.length + " classes to hooked/runescape.jar.\n");
        
    }
}
